Structures
Declaration
Structure type
Structure variable
struct {
VARIABLES
;
}
StructureVariable
;
struct {
int Age;
float Salary;
} John, Mary;
struct
NAME
{
VARIABLE1;
VARIABLE2;
…
VARIABLE 3;
};
struct student{
int Age;
float Salary;
};
struct student John, Mary;
John.Age = 20;
typedef struct student{
int Age;
float Salary;
} STUDENT;
STUDENT John, Mary;